package com.gqj.elec.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gqj.common.annotation.Excel;
import com.gqj.common.core.domain.BaseEntity;
import com.gqj.common.xss.Xss;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.poi.ss.usermodel.IndexedColors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 物资对象 elec_material
 *
 * @author lxq
 * @date 2023-12-17
 */
public class ElecMaterialVo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long materialId;

    /**
     * 物资编码
     */
    @NotBlank(message = "物资编码不能为空")
    @Excel(name = "物资编码", width = 30, cellType = Excel.ColumnType.STRING, headerBackgroundColor = IndexedColors.RED1)
    private String materialCode;

    /**
     * 物资名称
     */
    @NotBlank(message = "物资名称不能为空")
    @Excel(name = "物资名称", width = 30, cellType = Excel.ColumnType.STRING, headerBackgroundColor = IndexedColors.RED1)
    private String materialName;

    /**
     * 状态
     */
    private String materialStatus;

    /**
     * 规格型号
     */
    @Excel(name = "规格型号", cellType = Excel.ColumnType.STRING)
    private String specifications;

    /**
     * 分类ID
     */
    @NotBlank(message = "分类编号不能为空")
    @Excel(name = "分类编号", width = 20, type = Excel.Type.IMPORT, headerBackgroundColor = IndexedColors.RED1)
    private Long sortId;

    /**
     * 分类
     */
    @Excel(name = "分类", type = Excel.Type.EXPORT, cellType = Excel.ColumnType.STRING)
    private String sortName;

    /**
     * 库房ID
     */
    private Long warehouseId;

    /**
     * 库房
     */
    @NotBlank(message = "库房不能为空")
    @Excel(name = "库房", width = 20, cellType = Excel.ColumnType.STRING, headerBackgroundColor = IndexedColors.RED1)
    private String warehouseName;

    /**
     * 柜架ID
     */
    @NotBlank(message = "柜架编号不能为空")
    @Excel(name = "柜架编号", width = 20, type = Excel.Type.IMPORT, headerBackgroundColor = IndexedColors.RED1)
    private Long cabinetId;

    /**
     * 柜架
     */
    @Excel(name = "柜架", type = Excel.Type.EXPORT, cellType = Excel.ColumnType.STRING)
    private String cabinetName;

    /**
     * 层位ID
     */
    @NotBlank(message = "层位编号不能为空")
    @Excel(name = "层位编号", width = 20, type = Excel.Type.IMPORT, headerBackgroundColor = IndexedColors.RED1)
    private Long gridId;

    /**
     * 层位
     */
    @Excel(name = "层位", type = Excel.Type.EXPORT, cellType = Excel.ColumnType.STRING)
    private String gridName;

    /**
     * 单位ID
     */
    private Long unitId;

    /**
     * 单位
     */
    @Excel(name = "单位", width = 20, cellType = Excel.ColumnType.STRING)
    private String unitName;

    /**
     * 供应商ID
     */
    @Excel(name = "供应商编号", width = 20, type = Excel.Type.IMPORT)
    private Long providerId;

    /**
     * 供应商
     */
    @Excel(name = "供应商", type = Excel.Type.EXPORT, cellType = Excel.ColumnType.STRING)
    private String providerName;

    /**
     * 物资类别
     */
    private String materialCategory;

    /**
     * rfid编码
     */
    @Excel(name = "rfid编码", width = 30, cellType = Excel.ColumnType.STRING)
    private String rfidCode;
    /**
     * 备注
     */
    @Excel(name = "备注", cellType = Excel.ColumnType.STRING)
    private String remark;

    /**
     * 统计条目
     */
    private Integer statisticsDataNum;

    public Integer getStatisticsDataNum() {
        return statisticsDataNum;
    }

    public void setStatisticsDataNum(Integer statisticsDataNum) {
        this.statisticsDataNum = statisticsDataNum;
    }

    public void setMaterialId(Long materialId) {
        this.materialId = materialId;
    }

    public Long getMaterialId() {
        return materialId;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    @Xss(message = "物资编号不能包含脚本字符")
    @NotBlank(message = "物资编号不能为空")
    @Size(min = 0, max = 20, message = "物资编号长度不能超过20个字符")
    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    @NotBlank(message = "物资名称不能为空")
    @Size(min = 0, max = 20, message = "物资名称长度不能超过20个字符")
    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialStatus(String materialStatus) {
        this.materialStatus = materialStatus;
    }

    public String getMaterialStatus() {
        return materialStatus;
    }

    public void setSpecifications(String specifications) {
        this.specifications = specifications;
    }

    public String getSpecifications() {
        return specifications;
    }

    public void setSortId(Long sortId) {
        this.sortId = sortId;
    }

    @NotNull(message = "分类编号不能为空")
    public Long getSortId() {
        return sortId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setGridId(Long gridId) {
        this.gridId = gridId;
    }

    @NotNull(message = "层格编号不能为空")
    public Long getGridId() {
        return gridId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setProviderId(Long providerId) {
        this.providerId = providerId;
    }

    public Long getProviderId() {
        return providerId;
    }

    public void setMaterialCategory(String materialCategory) {
        this.materialCategory = materialCategory;
    }

    public String getMaterialCategory() {
        return materialCategory;
    }

    public void setRfidCode(String rfidCode) {
        this.rfidCode = rfidCode;
    }

    public String getRfidCode() {
        return rfidCode;
    }

    @NotNull(message = "柜架编号不能为空")
    public Long getCabinetId() {
        return cabinetId;
    }

    public void setCabinetId(Long cabinetId) {
        this.cabinetId = cabinetId;
    }

    public String getSortName() {
        return sortName;
    }

    public void setSortName(String sortName) {
        this.sortName = sortName;
    }

    @NotBlank(message = "库房名称不能为空")
    @Size(min = 0, max = 50, message = "分类编号长度不能超过50个字符")
    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public String getCabinetName() {
        return cabinetName;
    }

    public void setCabinetName(String cabinetName) {
        this.cabinetName = cabinetName;
    }

    public String getGridName() {
        return gridName;
    }

    public void setGridName(String gridName) {
        this.gridName = gridName;
    }

    @Size(min = 0, max = 50, message = "层格编号长度不能超过50个字符")
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("materialId", getMaterialId())
                .append("materialCode", getMaterialCode())
                .append("materialName", getMaterialName())
                .append("materialStatus", getMaterialStatus())
                .append("specifications", getSpecifications())
                .append("sortId", getSortId())
                .append("warehouseId", getWarehouseId())
                .append("gridId", getGridId())
                .append("unitId", getUnitId())
                .append("providerId", getProviderId())
                .append("materialCategory", getMaterialCategory())
                .append("rfidCode", getRfidCode())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
